Page({
  data: {
    reportList: [],
    currentClickIndex: 0,
  },

  onLoad: function (options) {
    // 1 发送异步请求获取数据
    wx.request({
      url: 'http://......',
      success: (result)=>{
        console.log("请求成功！！！！");
        var timeList = result.data;
        console.log(timeList);
        wx.setStorageSync("timeList", timeList);
        this.setData({
          reportList: timeList
        });
      },
      fail: (err)=>{
        console.log("请求失败！！！！")
        console.log(err);
      },
    });

  },

  // 列表的点击事件
  handleItemTap(e){
    // console.log(e);
    const {index} = e.currentTarget.dataset;
    var currentClickIndex = this.data.reportList[index];
    wx.navigateTo({
      url: '/pages/drawImage/drawImage?time=' + currentClickIndex,
    });
  }

})